package com.example.kotlinlearn.kotlinLearn.review

class Student(age1: Int, name1: String,val grade:Int) : Person(age1, name1){
    var english = 0

    init {
        println("这个类被实例化了")
        println("实例化的名字是$name1")
    }

    constructor() : this(1,"sfsf",4){
        println("first constructor create StudentClass")
    }

    constructor(a:Int,b:String) : this(){
        println("second constructor create StudentClass")
    }

    constructor(x:Int,y:Int,z:String) : this(){
        println("third constructor create StudentClass")
    }

    fun study() {
        println("${name1}a学生学习")
    }

    @JvmName("getGrade1")
    fun getGrade() = grade
}